$(document).on('click','.popup_selector',function (event) {
    event.preventDefault();
    var updateID = $(this).attr('data-inputid'); // Btn id clicked
    var elfinderUrl = Otk.DASHBOARD+'/elfinder/popup/';

    // trigger the reveal modal with elfinder inside
    var triggerUrl = elfinderUrl + updateID;
    $.colorbox({
        href: triggerUrl,
        fastIframe: true,
        iframe: true,
        width: '80%',
        height: '80%'
    });

});
// function to update the file selected by elfinder
function processSelectedFile(files, requestingField) {

    var controllerScope = angular.element($("#elfinder-controller")).scope();
    // controllerScope.$apply(function() {
        //console.log("filess", files);
        controllerScope.processSelectedFile(files, requestingField);
    // });
}
